/*
exec spm_GetFullTree_Debug 452
declare @NewTreeID int
exec spm_CopyTree 'qsw',455,453,458,'455',@NewTreeID
exec spm_GetFullTree_Debug 452
*/


/*
exec spm_GetFullTree_Debug 452

declare @TaskID int
declare @TreeID int
exec spm_CreateTaskAndTree 
@OpUserName='qsw',
@TaskTitle='qsw test task',
@PTreeID=456,
@TaskType='task',
@TaskState='new',
@TaskPriority='low',
@TaskUser1=NULL,
@TaskUser2=NULL,
@TaskUser3=NULL,
@TaskUser4=NULL,
@TaskUser5=NULL,
@TaskTag1=NULL,
@TaskTag2=NULL,
@TaskTag3=NULL,
@TaskTag4=NULL,
@TaskTag5=NULL,
@TaskID=@TaskID OUTPUT,
@TreeID=@TreeID OUTPUT
exec spm_GetFullTree_Debug 452
*/

/*
exec spm_GetFullTree_Debug 452
exec spm_LinkTree 'qsw','(462)',610
exec spm_GetFullTree_Debug 452
*/

/*
declare @NewTreeID int
exec spm_GetFullTree_Debug 452
print '111'
exec spm_CopyTree 'qsw',462,453,460,'',@NewTreeID
print '222'
exec spm_GetFullTree_Debug 452
print '333'
*/

/*
declare @NewTreeID int
exec spm_GetFullTree_Debug 452
print '111'
exec spm_MoveTree 'qsw','(444)','(610)',682
print '222'
exec spm_GetFullTree_Debug 452
print '333'
*/

declare @time1 datetime
declare @time2 datetime

set @time1=getdate()
exec spm_GetFullTree 7,'','','',1
set @time2=getdate()
print datediff(millisecond,@time1,@time2)
